We are migrating the bug tracker to github Issues. This is now the preferred way to report NASM bugs.

Self-registration is disabled due to spam issue (mail gorcunov@gmail.com or hpa@zytor.com to create an account)

Bug 3392805 - In disabled preprocessor part nasm_new is incorrectly used
Summary: In disabled preprocessor part nasm_new is incorrectly used
Status: CLOSED FIXED
Alias: None
Product: NASM
Classification: Unclassified
Component: Assembler (show other bugs)
Version: 2.16.xx
Hardware: All All
: Medium minor
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2022-08-25 05:00 PDT by E. C. Masloch
Modified: 2022-11-21 11:26 PST (History)
4 users (show)

Obtained from: Built from git using configure
Generated by: ---
Bug category:
Observed for: ---
Regression: ---
Regression since:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description E. C. Masloch 2022-08-25 05:00:14 PDT
Compilation fails when editing preproc.c to have "#define TOKEN_BLOCKSIZE 0" in https://github.com/netwide-assembler/nasm/blob/3aebb20f123033dcd767f0abc46b18cbefed8091/asm/preproc.c#L1695

Here's the fix:

diff --git a/asm/preproc.c b/asm/preproc.c
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -1766,7 +1766,7 @@ static void delete_Blocks(void)
 static inline Token *alloc_Token(void)
 {
     Token *t;
-    nasm_new(*t);
+    nasm_new(t);
     return t;
 }

@@
Comment 1 H. Peter Anvin 2022-11-21 11:26:43 PST
Confirmed, and fix checked in. Thanks!